package com.ccrfid.rmc6.entity.asset;

import com.vividsolutions.jts.geom.Point;
import org.hibernate.annotations.Type;

import javax.persistence.*;
import java.sql.Timestamp;

@Entity
@Table(name = "v_asset")
public class AssetView {
    private Long id;
    private String assetName;
    private String assetSn;
    private Long cardNumber;
    private Integer enabled;
    private String remark;

    private Integer onlineStatus;
    private Integer cutoffStatus;
    private Integer lowpowerStatus;
    private Integer heartRate;
    private Integer locatorAddress;
    private Timestamp lastLocateTime;
    private Integer floorNumber;
    private Point pos;

    @Id
    @Column(name = "id", nullable = false)
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "asset_name", nullable = false, length = 45)
    public String getAssetName() {
        return assetName;
    }

    public void setAssetName(String assetName) {
        this.assetName = assetName;
    }

    @Basic
    @Column(name = "asset_sn", length = 45)
    public String getAssetSn() {
        return assetSn;
    }

    public void setAssetSn(String assetSn) {
        this.assetSn = assetSn;
    }

    @Basic
    @Column(name = "card_number", nullable = true)
    public Long getCardNumber() {
        return cardNumber;
    }

    public void setCardNumber(Long cardNumber) {
        this.cardNumber = cardNumber;
    }

    @Basic
    @Column(name = "is_enabled", nullable = false)
    public Integer getEnabled() {
        return enabled;
    }

    public void setEnabled(Integer enabled) {
        this.enabled = enabled;
    }

    @Basic
    @Column(name = "remark", length = 255)
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Basic
    @Column(name = "online_status")
    public Integer getOnlineStatus() {
        return onlineStatus;
    }

    public void setOnlineStatus(Integer onlineStatus) {
        this.onlineStatus = onlineStatus;
    }

    @Basic
    @Column(name = "cutoff_status")
    public Integer getCutoffStatus() {
        return cutoffStatus;
    }

    public void setCutoffStatus(Integer cutoffStatus) {
        this.cutoffStatus = cutoffStatus;
    }

    @Basic
    @Column(name = "lowpower_status")
    public Integer getLowpowerStatus() {
        return lowpowerStatus;
    }

    public void setLowpowerStatus(Integer lowpowerStatus) {
        this.lowpowerStatus = lowpowerStatus;
    }

    @Basic
    @Column(name = "heart_rate")
    public Integer getHeartRate() {
        return heartRate;
    }

    public void setHeartRate(Integer heartRate) {
        this.heartRate = heartRate;
    }

    @Basic
    @Column(name = "locator_address")
    public Integer getLocatorAddress() {
        return locatorAddress;
    }

    public void setLocatorAddress(Integer locatorAddress) {
        this.locatorAddress = locatorAddress;
    }

    @Basic
    @Column(name = "last_locate_time")
    public Timestamp getLastLocateTime() {
        return lastLocateTime;
    }

    public void setLastLocateTime(Timestamp lastLocateTime) {
        this.lastLocateTime = lastLocateTime;
    }

    @Basic
    @Column(name = "floor_number", nullable = true)
    public Integer getFloorNumber() {
        return floorNumber;
    }

    public void setFloorNumber(Integer floorNumber) {
        this.floorNumber = floorNumber;
    }

    @Basic
    @Column(name = "pos")
    @Type(type = "jts_geometry")
    public Point getPos() {
        return pos;
    }

    public void setPos(Point pos) {
        this.pos = pos;
    }
}
